
import React from "react";
import styles from "../../css/my.module.css";
import { clear, getInfo, getTOKEN } from "../../utils/StorageUtil";
import { myNav, AVATAR, Common } from "../../const/imgs";
class UserInfo extends React.Component {
    constructor(props){
        super(props);
        this.state={
                user_info:getInfo('UserInfo')
        }
    }
    render() {
      let {user_info:{sex,name,phone} } = this.state;
      return (
        <div className={styles["userinfo"]}>
          <div className={styles["avatar"]}>
            <div className={styles["avatar_1"]}>
              <div className={styles["avatar_2"]}>
                <img src={ parseInt(sex) ===1?AVATAR.male:AVATAR.famale  } alt='' />
              </div>
            </div>
          </div>
          <div className={styles["nickname"]}>
            {name}
            </div>
          <div className={styles["user_phone"]}>
            {phone}
            </div>
        </div>
      );
    }
  }

  export default UserInfo;